<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>停车场用户终端</title>
    <link rel="stylesheet" type="text/css"
          href="/static/assets/css/layui.css">
</head>
<body>
<ul class="layui-nav" lay-filter="">
    <li class="layui-nav-item"><a data-src="/desk/parkPlace">车位查询</a></li>
    <li class="layui-nav-item layui-this"><a data-src="/desk/announcement">主页</a></li>
</ul>
<div class="content" style="height: 100%;">
    <!-- 内容主体区域 -->
</div>

<script src="/static/assets/jquery.min.js"></script>
<script src="/static/assets/layui.js"></script>
<script type="text/javascript">
    $(function () {
        layui.use(['element', 'layer'], function () {
            var element = layui.element,
                layer = layui.layer
            function FrameWH() {
                $("iframe").css("height", "91.5vh");
                $("iframe").css("width", "100%");
            }

            function change_url(body_url) {
                var content = '<iframe scrolling="auto" frameborder="0" src="' + body_url + '"></iframe>'
                $(".content").empty()
                $(".content").append(content)
                FrameWH()
            }

            change_url('/desk/announcement')
            $(".layui-nav-item a").on("click", function () {
                var address = $(this).attr("data-src");
                change_url(address)
            })
        })
    })
</script>
</body>
</html>
